package zhishuang.wang.sansi.playlist.entry;

/**
 * @Author Zhishuang.Wang
 * @Date 2023/7/5 11:08
 * @Email 1406110602@qq.com
 */

import zhishuang.wang.sansi.tools.ReturnData;

public class Animation {
    private Integer inAnimation;
    private Integer inAnimationSpeed;
    private Integer outAnimation;
    private Integer outAnimationSpeed;
    private Integer stopAnimation;
    private Integer stopAnimationSpeed;

    public Animation() {
    }

    public ReturnData checkParam() {
        ReturnData rd = new ReturnData();
        rd.setCode(1);
        String errorMes = "";
        if (this.inAnimation != null && (this.inAnimation < 0 || this.inAnimation > 35) && this.inAnimation != 100) {
            errorMes = errorMes + "入动画值不支持，支持范围：[0 - 35,100]；";
        }

        if (this.outAnimation != null && (this.outAnimation < 0 || this.outAnimation > 35) && this.outAnimation != 100) {
            errorMes = errorMes + "出动画值不支持，支持范围：[0 - 35,100]；";
        }

        if (this.stopAnimation != null && (this.stopAnimation < 0 || this.stopAnimation > 35) && this.stopAnimation != 100) {
            errorMes = errorMes + "停留画值不支持，支持范围：[0 - 35,100]；";
        }

        if (errorMes != null && errorMes.length() != 0) {
            rd.setMessage(errorMes);
        } else {
            rd.setCode(0);
        }

        return rd;
    }

    public Integer getInAnimation() {
        return this.inAnimation;
    }

    public void setInAnimation(Integer inAnimation) {
        this.inAnimation = inAnimation;
    }

    public Integer getOutAnimation() {
        return this.outAnimation;
    }

    public void setOutAnimation(Integer outAnimation) {
        this.outAnimation = outAnimation;
    }

    public Integer getStopAnimation() {
        return this.stopAnimation;
    }

    public void setStopAnimation(Integer stopAnimation) {
        this.stopAnimation = stopAnimation;
    }

    public Integer getInAnimationSpeed() {
        return this.inAnimationSpeed;
    }

    public void setInAnimationSpeed(Integer inAnimationSpeed) {
        this.inAnimationSpeed = inAnimationSpeed;
    }

    public Integer getOutAnimationSpeed() {
        return this.outAnimationSpeed;
    }

    public void setOutAnimationSpeed(Integer outAnimationSpeed) {
        this.outAnimationSpeed = outAnimationSpeed;
    }

    public Integer getStopAnimationSpeed() {
        return this.stopAnimationSpeed;
    }

    public void setStopAnimationSpeed(Integer stopAnimationSpeed) {
        this.stopAnimationSpeed = stopAnimationSpeed;
    }
}
